<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function uniqueArr(arr)
        {
           let set = new Set();
           arr.forEach(item=>{
            set.add(item);
           })
           let result = [...set];
           return result;
        }

        let arr = [1,2,1,2,3,4,5,6,5,5,5,5,5,5,5,5,5,0,10,22];
        let newArr = uniqueArr(arr);
        console.log(newArr);
    </script>
</body>
</html>